  cd "$SRC/${isim%-bin}-${surum}/tool/$CARCH"
  for file in *.xz; do
    xzcat $file > ${file%.xz}
    chmod +x ${file%.xz}
  done
  rm -fv ./*.xz
  cd ../..
  patch --verbose -p0 < "/sources/sanitize.patch"
  sed -i 's|log\.txt|/var/log/ventoy.log|g' WebUI/static/js/languages.js

  for binary in xzcat hexdump mkexfatfs mount.exfat-fuse; do
    rm -fv tool/$CARCH/$binary
  done


  cd "$SRC/${isim%-bin}-${surum}"

  install -Dm644 -vt      "$PKG/opt/${isim%-bin}/boot/"            boot/*
  install -Dm644 -vt      "$PKG/opt/${isim%-bin}/${isim%-bin}/" "${isim%-bin}"/*
  install -Dm755 -vt      "$PKG/opt/${isim%-bin}/tool/"            tool/*.{cer,sh}
  install -Dm755 -vt      "$PKG/opt/${isim%-bin}/tool/$CARCH/"     tool/$CARCH/*
  install -Dm755 -vt      "$PKG/opt/${isim%-bin}/"                 *.sh
  cp --no-preserve=o -avt "$PKG/opt/${isim%-bin}/"                 plugin WebUI

  for binary in xzcat hexdump mount.exfat-fuse; do
    ln -svf /usr/bin/$binary "$PKG/opt/${isim%-bin}/tool/$CARCH/"
  done
  # working around exfatprogs provides exfat-utils but is missing mkexfatfs
  ln -svf /usr/bin/mkfs.exfat "$PKG/opt/${isim%-bin}/tool/$CARCH/mkexfatfs"

  install -Dm755 /sources/ventoyweb -vt "$PKG"/usr/bin/ventoyweb
 install -Dm755 /sources/ventoy-persistent -vt "$PKG"/usr/bin/ventoy-persistent
 install -Dm755 /sources/ventoy -vt "$PKG"/usr/bin/ventoy

  